package com.example.userspringboot.controller;

import com.example.userspringboot.common.Result;
import com.example.userspringboot.entity.DrugClassification;
import com.example.userspringboot.service.DrugClassificationService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/drugClassification")
public class DrugClassificationController {

    @Resource
    DrugClassificationService drugClassificationService;

    @GetMapping("/selectAll")
    public Result selectAll() {
        List<DrugClassification> drugClassificationList = drugClassificationService.selectAll();
        return Result.success(drugClassificationList);
    }
}
